[clang-sycl-linker] Fix use of uninitialized memory in temp files#114488
Merged
[clang-sycl-linker] Fix use of uninitialized memory in temp files#114488
Conversation
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Member
|
@llvm/pr-subscribers-clang Author: Nick Sarnie (sarnex) ChangesThis fixes the current sanitizer CI failures. I manually confirmed the fix with a MemorySanitizer build. Full diff: https://github.com/llvm/llvm-project/pull/114488.diff 1 Files Affected:
diff --git a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
index 0639b95c76e218..076458a275d986 100644
--- a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+++ b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
@@ -230,7 +230,7 @@ Expected<StringRef> linkDeviceInputFiles(ArrayRef<std::string> InputFiles,
CmdArgs.push_back("--suppress-warnings");
if (Error Err = executeCommands(*LLVMLinkPath, CmdArgs))
return std::move(Err);
- return *OutFileOrErr;
+ return Args.MakeArgString(*OutFileOrErr);
}
// This utility function is used to gather all SYCL device library files that
|
Contributor
|
PR title: "[Clang][SYCL] Fix use of uninitalized memory in temp files" tag: [Clang][SYCL] -> [clang-sycl-linker] |
Member
Author
smallp-o-p
pushed a commit
to smallp-o-p/llvm-project
that referenced
this pull request
Nov 3, 2024
…vm#114488) This fixes the current sanitizer CI [failures](https://lab.llvm.org/buildbot/#/builders/169/builds/4839/steps/13/logs/stdio). I manually confirmed the fix with a MemorySanitizer build. Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
NoumanAmir657
pushed a commit
to NoumanAmir657/llvm-project
that referenced
this pull request
Nov 4, 2024
…vm#114488) This fixes the current sanitizer CI [failures](https://lab.llvm.org/buildbot/#/builders/169/builds/4839/steps/13/logs/stdio). I manually confirmed the fix with a MemorySanitizer build. Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the current sanitizer CI failures. I manually confirmed the fix with a MemorySanitizer build.